package org.springframework.samples.countries.web.translate;

import java.util.HashMap;

import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;

import pikes.ecma.FunctionDeclaration;
import pikes.ecma.SourceElements;
import pikes.peak.test.PikesPeakComponentTestCase;

public class BehaviourTestCase extends PikesPeakComponentTestCase {

	@Test
	public void testNoBehaviour() throws Exception {
		Behaviour behaviour = new Behaviour();

		SourceElements se = behaviour.getValue(new HashMap(), pikesPeakRequest.getRequestContext());
		Assert.assertNotNull(se);

		Assert.assertTrue(se.isEmpty());
	}

	@Test
	@Ignore
	public void testBehaviour() throws Exception {
		Behaviour behaviour = new Behaviour();
		behaviour.add(new FunctionDeclaration("go"));

		SourceElements se = behaviour.getValue(new HashMap(), pikesPeakRequest.getRequestContext());
		Assert.assertNotNull(se);
		Assert.assertTrue(se.isEmpty());

	}
}
